﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
//
using iPublic;

namespace HRecycle.Comm
{
    /// <summary>
    /// 处理完成的提示窗口，海宏软件
    /// 修改记录：
    ///   20171215，zch，创建基本功能
    /// </summary>
    public partial class FrmWanCheng : Form
    {
        public FrmWanCheng()
        {
            InitializeComponent();
        }

        private void FrmWanCheng_Load(object sender, EventArgs e)
        {
            try
            {
                //FormBorderStyle = FormBorderStyle.None;
                btn_ok.Focus();
            }
            catch (Exception x)
            { }
        }

        private void FrmWanCheng_Shown(object sender, EventArgs e)
        {
            string s = "";
            try
            {
                tm_main.Enabled = true;
                tm_main.Tag = Convert.ToInt16(lbl_time.Text);
                //显示
                lbl_caption.Text += "【" + iDefine.toufangList.A绑定用户增加积分.add_score.ToString("N") + "】";
                foreach (iDefine.json验证物品 itm in iDefine.toufangList) s += (string.IsNullOrEmpty(s) ? "" : "\r\n") + itm.msg;
                txt_info.Text += "\r\n\r\n------------------您投放了以下物品------------------\r\n" + s;
            }
            catch (Exception x)
            {
                showInfo(x.Message);
            }
        }

        private void btn_ok_Click(object sender, EventArgs e)
        {
            Close();
            DialogResult = DialogResult.OK;
        }

        private void tm_main_Tick(object sender, EventArgs e)
        {
            Timer tm = sender as Timer;
            bool lEnable = tm.Enabled;
            tm.Enabled = false;
            //
            int n = Convert.ToInt16(lbl_time.Text) - 1;
            lbl_time.Text = n.ToString();
            if (n <= 0) btn_ok_Click(sender, e); else tm.Enabled = lEnable;
        }


        private void showInfo(string sInfo, bool lTime = true)
        {
            //显示提示信息
        }

    }


}
